% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FIPS_FUNCTIONS.R
\name{fips_lead_zero}
\alias{fips_lead_zero}
\title{FIPS - Add leading zeroes to fips codes if missing, replace with NA if length invalid}
\usage{
fips_lead_zero(fips)
}
\arguments{
\item{fips}{vector of numeric or character US FIPS codes}
}
\value{
vector of same length
}
\description{
Ensures FIPS has the leading zero, but does NOT VALIDATE FIPS -
It does NOT check if FIPS is valid other than checking its length.
fips could be a state, county, tract, blockgroup, or block FIPS code.
}
\examples{
testfips1 <- c(1,"01",1234,"1234","12345",123456)
testfips <- c(1, "1", "12", "123", "1234", "12345", "", NA, "words")
fips_lead_zero(testfips1)
fips_lead_zero(testfips)

}
\seealso{
\code{\link[=fips_valid]{fips_valid()}} \code{\link[=fipstype]{fipstype()}}
}
